package routers

import (
	"github.com/gin-gonic/gin"
	"jianghairui/uni-upload/controller/oss"
	"jianghairui/uni-upload/middleware"
)

func OssRouterInit(r *gin.Engine) {
	ossRouters := r.Group("/oss")
	// 设置中间件 - 验证签名
	ossRouters.Use(middleware.CheckLogin)
	{
		ossRouters.GET("/test", oss.HomeController{}.Test)
		ossRouters.POST("/upload", oss.HomeController{}.UploadFile)
		ossRouters.POST("/moveFile", oss.HomeController{}.MoveFile)
		ossRouters.POST("/deleteFile", oss.HomeController{}.DeleteFile)
		ossRouters.POST("/fileExist", oss.HomeController{}.FileExist)
	}
}
